package org.example.ychdp.entity;

import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * concert
 * @author 
 */
public class Concert implements Serializable {
    /**
     * 演唱会 ID
     */
    private Integer concertid;

    /**
     * 演唱会名称
     */
    private String concertname;

    /**
     * 艺人或团体
     */
    private String artist;

    /**
     * 演唱会日期“2024-12-31”
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date concertdate;

    /**
     * 演唱会时间“20:00”
     */
    @DateTimeFormat(pattern = "HH:mm:ss")
    private Date concerttime;

    /**
     * 演唱会地点
     */
    private String venue;

    /**
     * 图片
     */
    private String concertImg;

    /**
     * 演唱会简介
     */
    private String introduction;

    private static final long serialVersionUID = 1L;

    public Integer getConcertid() {
        return concertid;
    }

    public void setConcertid(Integer concertid) {
        this.concertid = concertid;
    }

    public String getConcertname() {
        return concertname;
    }

    public void setConcertname(String concertname) {
        this.concertname = concertname;
    }

    public String getArtist() {
        return artist;
    }

    public void setArtist(String artist) {
        this.artist = artist;
    }

    public Date getConcertdate() {
        return concertdate;
    }

    public void setConcertdate(Date concertdate) {
        this.concertdate = concertdate;
    }

    public Date getConcerttime() {
        return concerttime;
    }

    public void setConcerttime(Date concerttime) {
        this.concerttime = concerttime;
    }

    public String getVenue() {
        return venue;
    }

    public void setVenue(String venue) {
        this.venue = venue;
    }

    public String getConcertImg() {
        return concertImg;
    }

    public void setConcertImg(String concertImg) {
        this.concertImg = concertImg;
    }

    public String getIntroduction() {
        return introduction;
    }

    public void setIntroduction(String introduction) {
        this.introduction = introduction;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Concert other = (Concert) that;
        return (this.getConcertid() == null ? other.getConcertid() == null : this.getConcertid().equals(other.getConcertid()))
            && (this.getConcertname() == null ? other.getConcertname() == null : this.getConcertname().equals(other.getConcertname()))
            && (this.getArtist() == null ? other.getArtist() == null : this.getArtist().equals(other.getArtist()))
            && (this.getConcertdate() == null ? other.getConcertdate() == null : this.getConcertdate().equals(other.getConcertdate()))
            && (this.getConcerttime() == null ? other.getConcerttime() == null : this.getConcerttime().equals(other.getConcerttime()))
            && (this.getVenue() == null ? other.getVenue() == null : this.getVenue().equals(other.getVenue()))
            && (this.getConcertImg() == null ? other.getConcertImg() == null : this.getConcertImg().equals(other.getConcertImg()))
            && (this.getIntroduction() == null ? other.getIntroduction() == null : this.getIntroduction().equals(other.getIntroduction()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getConcertid() == null) ? 0 : getConcertid().hashCode());
        result = prime * result + ((getConcertname() == null) ? 0 : getConcertname().hashCode());
        result = prime * result + ((getArtist() == null) ? 0 : getArtist().hashCode());
        result = prime * result + ((getConcertdate() == null) ? 0 : getConcertdate().hashCode());
        result = prime * result + ((getConcerttime() == null) ? 0 : getConcerttime().hashCode());
        result = prime * result + ((getVenue() == null) ? 0 : getVenue().hashCode());
        result = prime * result + ((getConcertImg() == null) ? 0 : getConcertImg().hashCode());
        result = prime * result + ((getIntroduction() == null) ? 0 : getIntroduction().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", concertid=").append(concertid);
        sb.append(", concertname=").append(concertname);
        sb.append(", artist=").append(artist);
        sb.append(", concertdate=").append(concertdate);
        sb.append(", concerttime=").append(concerttime);
        sb.append(", venue=").append(venue);
        sb.append(", concertImg=").append(concertImg);
        sb.append(", introduction=").append(introduction);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}